|
SET BUMP MAPPING ON
This command will set the bump map for the specified object.
SET BUMP MAPPING ON Object Number, Image Number
Object Number
Integer
The object number
Image Number
Integer
The texture number, you must provide a normal map texture for this command to work
This command does not return a value.
Bumpmapped textures are combined with the main texture to create an object with a visually uneven surface. Your video card must have the ability to create this hardware effect. Be aware that you must provide a normal map texture for this command to work, and not a height map texture (greyscale). The bump mapping uses the normal map to generate pseudo-3D data which the light calculation can use to highlight areas of the object surface.
sync on : sync rate 60 : hide mouse:cls 0:color backdrop 0
fog on:fog color 0:set ambient light 50
ObjectNumber=2:ImageNumber=2
wire=0:trans=0:cull=0:fliter=0:light=0:fog=0:ambient=0
load image "bump.bmp",7
set global object creation 0
set dir "models"
load object "ast4.x",ObjectNumber
set object specular ObjectNumber,0
rotate object ObjectNumber,270,0,0
set dir ".."
set bump mapping on ObjectNumber,7
while mouseclick()<>2
set cursor 0,0
print "press 1 to set object wireframe";wire:if inkey$()="1" then wire=1-wire:set object wireframe ObjectNumber,wire
print "press 2 to set object transparency";trans:if inkey$()="2" then trans=1-trans:set object transparency ObjectNumber,trans
print "press 3 to set object cull";cull:if inkey$()="3" then cull=1-cull:set object cull ObjectNumber,cull
print "press 4 to set object filter";filter:if inkey$()="4" then filter=1-filter:set object filter ObjectNumber,filter
print "press 5 to set object light";light:if inkey$()="5" then light=1-light:set object light ObjectNumber,light
print "press 6 to set object fog";fog:if inkey$()="6" then fog=1-fog:set object fog ObjectNumber,fog
print "press 7 to set object ambient";ambient:if inkey$()="7" then ambient=1-ambient:set object ambient ObjectNumber,ambient
while scancode()<>0:endwhile
if mouseclick()=1 then yrotate object ObjectNumber,wrapvalue(object angle y(ObjectNumber)+1)
sync
endwhile
while mouseclick()=1:endwhile
delete object ObjectNumber
delete image 7
end
BASIC3D Commands Menu
Index
|